<template>
  <div class="detail">
    <!-- 医院的名字与医院等级的结构 -->
    <div class="top">
      <div class="name">{{hospitalStore.hospitalInfo.hospital?.hosname}}</div>
      <div class="level">
        <svg t="1730690734571" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3159" width="16" height="16"><path d="M857.28 344.992h-264.832c12.576-44.256 18.944-83.584 18.944-118.208 0-78.56-71.808-153.792-140.544-143.808-60.608 8.8-89.536 59.904-89.536 125.536v59.296c0 76.064-58.208 140.928-132.224 148.064l-117.728-0.192A67.36 67.36 0 0 0 64 483.04V872c0 37.216 30.144 67.36 67.36 67.36h652.192a102.72 102.72 0 0 0 100.928-83.584l73.728-388.96a102.72 102.72 0 0 0-100.928-121.824zM128 872V483.04c0-1.856 1.504-3.36 3.36-3.36H208v395.68H131.36A3.36 3.36 0 0 1 128 872z m767.328-417.088l-73.728 388.96a38.72 38.72 0 0 1-38.048 31.488H272V476.864a213.312 213.312 0 0 0 173.312-209.088V208.512c0-37.568 12.064-58.912 34.72-62.176 27.04-3.936 67.36 38.336 67.36 80.48 0 37.312-9.504 84-28.864 139.712a32 32 0 0 0 30.24 42.496h308.512a38.72 38.72 0 0 1 38.048 45.888z" p-id="3160" fill="#bfbfbf"></path></svg>
        <span>{{hospitalStore.hospitalInfo.hospital?.param.hostypeString}}</span>
      </div>
    </div>
    <!-- 医院的logo与路线 -->
    <div class="logo">
      <div class="left">
        <img :src="`data:image/jpeg;base64,`+hospitalStore.hospitalInfo.hospital?.logoData" alt="">
      </div>
      <div class="right">
        <div class="address">
          <svg t="1730700906786" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3323" width="16" height="16"><path d="M874.048 533.333C863.424 716.63 716.629 863.424 533.333 874.048v43.285a21.333 21.333 0 0 1-42.666 0v-43.285C307.37 863.424 160.576 716.629 149.952 533.333h-43.285a21.333 21.333 0 0 1 0-42.666h43.285c10.624-183.296 157.419-330.091 340.715-340.715v-43.285a21.333 21.333 0 0 1 42.666 0v43.285c183.296 10.624 330.091 157.419 340.715 340.715h42.816a21.333 21.333 0 1 1 0 42.666h-42.837z m-42.752 0H703.509a21.333 21.333 0 0 1 0-42.666h127.787c-10.517-159.744-138.24-287.446-297.963-297.963V320a21.333 21.333 0 0 1-42.666 0V192.704c-159.744 10.517-287.446 138.24-297.963 297.963H320a21.333 21.333 0 0 1 0 42.666H192.704c10.517 159.744 138.24 287.446 297.963 297.963V704a21.333 21.333 0 0 1 42.666 0v127.296c159.744-10.517 287.446-138.24 297.963-297.963zM512 554.667a42.667 42.667 0 1 1 0-85.334 42.667 42.667 0 0 1 0 85.334z" p-id="3324" fill="#8a8a8a"></path></svg>
          <span>具体位置: {{ hospitalStore.hospitalInfo.hospital?.param.fullAddress }}</span>
        </div>
        <div class="route">
          规划路线: {{ hospitalStore.hospitalInfo.hospital?.route }}
        </div>
      </div>
    </div>
    <!-- 医院介绍 -->
    <div class="footer">
      <h1>医院介绍</h1>
    <p>{{ hospitalStore.hospitalInfo.hospital?.intro }}</p>
    </div>
  </div>
</template>

<script setup lang="ts">
// 引入医院详情仓库的数据
import useDetailStore from '../../../store/modules/hospitalDetail'
let hospitalStore = useDetailStore();
</script>

<style scoped lang="scss">
.detail{
  margin-left: 20px;
  .top{
    display: flex;
    .name{
      font-size: 25px;
    }
    .level{
      margin-left: 10px;
      color: #7f7f7f;
      text-align: center;
      line-height: 30px;
      span{
        margin-right: 5px;
      }
    }
  }
  .logo{
    display: flex;
    .left{
      margin: 20px;
      img{
        width: 80px;
        height: 80px;
        border-radius: 50%;
      }
    }
    .right{
      color: #7f7f7f;
      margin-left: 20px;
      line-height: 25px;
      .address{
        margin: 10px -20px;
        display: flex;
        align-items: center;
        svg{
          margin-right: 4px;
        }
      }
    }
  }
  .footer{
    color: #7f7f7f;
    p{
      line-height: 30px;
      margin-top: 10px;
    }
  }
}

</style>